In the Indian civil aviation story, riddled with spectacular failures, SpiceJet’s turnaround stands out.

On February 7, the New Delhi-based company reported a net profit of Rs 239.9 crores ($37.2 million) for the quarter ended December 2017 – the 12th consecutive quarter it declared profits for.

On the other hand, state-owned Air India continues to bleed. Till date, the government has infused Rs 26,545 crores ($4.1 billion) as equity into the airline, junior aviation minister Jayant Sinha said in Parliament on February 8. Yet, Air India lost Rs 5,765 crores in the financial year 2017, Sinha added. Living on taxpayers’ benevolence, it is yet to report its full financial results for the year 2017.

Both these firms have faced trouble – Air India since 2007, and SpiceJet around 2012.

What worked for the latter?

Data: Annual financial results of SpiceJet and Air India

SpiceJet’s flight path

In 2014, SpiceJet, then headed by Kalanithi Maran, was in a grim situation. In early December, a severe cash crunch had forced it to delay salaries. And that was only the tip of the iceberg.

The cash crunch itself was the result of the civil aviation regulator’s order that prevented it from taking bookings more than a month in advance. Until the Directorate General of Civil Aviation’s order, the airline had been servicing its working capital needs by selling discounted tickets over a year in advance.

Following the Directorate General of Civil Aviation’s move, the state-owned Airports Authority of India withdrew its credit line to SpiceJet. Now the airline was forced to pay every time its planes took off from or landed at Airports Authority of India facilities. Things hit rock-bottom on December 17, 2014, when the firm stopped operations after fuel companies temporarily shut down supplies, citing pending dues.

In the financial year 2014, SpiceJet recorded an annual loss of Rs 1,003 crores and dues of around Rs 1,600 crores. It was also sitting on a debt of over Rs 1,400 crores, along with over Rs 2,000 crores of other liabilities.

And just when things seemed hopeless came a change of hands. And, along with it, falling fuel costs and government support.

Towards the end of 2014, the Narendra Modi government asked banks to lend Rs 600 crores as working capital debt to SpiceJet. The Directorate General of Civil Aviation was also nudged to lift its ban on advance bookings.

In January 2015, Ajay Singh, who had co-founded SpiceJet in 2005 before selling his stake to the Marans five years later, took over the reins again. He bought a 58.5% stake for a meagre Rs 2 per share. And the turnaround began.

The year 2016 saw SpiceJet’s fuel expenses reduce to between 40% and 50% from the previous year, reportedly saving it over Rs 1,000 crores. Soon the airline became the world’s top airline stock, gaining 124% in June 2017, according to Bloomberg.

The Maharaja’s legacy

Meanwhile, no amount of government support helped the Maharaja. Unable to keep up with other low-cost carriers, the state-owned airline has made losses for at least a decade now.

In any case, the high interest burden and competition are only two of its issues, Sinha had said in 2016.

Trouble began with the merger of Air India and Indian Airlines in 2007 and the merged entity began making losses in the following financial year. Things worsened with the arbitrary route transfers and purchase of aircraft.

“The aftershocks of the government’s directive for Air India and Indian Airlines to merge are still being experienced, with the combined entity lurching from one precarious debt position to another,” said a 2013 report by the Planning Commission.

In 2012, the government devised a turnaround plan, but six years and over Rs 20,000 crores later, there isn’t much to show.

Finally, the company registered operating profit of Rs 298 crores in the financial year 2017, Sinha said, but it is still sitting on a debt of at least Rs 48,876 crores.

Data: Parliament response by Jayant Sinha, minister of state for civil aviation

Since the turnaround plan failed, the government has been looking to privatise the airline. It has even opened the doors to global players. Various options are being mulled over to figure out a deal that works for both, the government and the buyer.

What is needed is a management that is up to the task of untangling the decade-old mess.

The question is: who can rescue Air India the way Ajay Singh saved SpiceJet?

This article first appeared on Quartz.